#include <iostream>
using namespace std;

int main() {
    long long n = 20240601000, ans = 0;
    for (long long i = 2; i * i <= n; i++)
        if (n % i == 0 && i % 2 == n / i % 2)
            ans += ((n / i - i) / 2) * ((n / i - i) / 2) + 10120300500;
    cout << ans << '\n';

    return 0;
}